package edu.wayne.cs.csc4110.hw6.framework.gui.inbox;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;

import edu.wayne.cs.csc4110.hw6.framework.gui.lobby.GameButton;
import edu.wayne.cs.csc4110.hw6.interfaces.user.User;

public class InboxNavigation extends JPanel {
	private JButton composeBtn;

	public InboxNavigation(final User user) {
		this.setLayout(new FlowLayout(FlowLayout.LEFT));
		composeBtn = new GameButton("Compose");
		composeBtn.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				SwingUtilities.invokeLater(new Runnable() {
					@Override
					public void run() {
						new PrivateChatFrame(user).setVisible(true);
					}
				});
			}
		});
		this.add(composeBtn);


	}
}
